Carbon


GetRootControl

Header: Controls.h Carbon status: Supported

Obtains a handle to a window’s root control.

OSErr GetRootControl (
    WindowRef inWindow, 
    ControlRef *outControl
);
inWindow

A pointer to the window to be examined.

outControl

Pass a pointer to a ControlHandle value. On return, the ControlHandle value is set to a handle to the root control.

function result

A result code.

DISCUSSION

You can call GetRootControl to determine whether or not a root control (and therefore an embedding hierarchy) exists within a specified window. Once you have the root control’s handle, you can pass it to functions such as DisposeControl, ActivateControl, and DeactivateControl to apply specified actions to the entire embedding hierarchy.

Note that the minimum, maximum, and initial settings for a root control are reserved and should not be changed.

VERSION NOTES

This function is available with Appearance Manager 1.0 and later.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)